Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7851129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:05:32+00:00 2026-06-02T19:05:32+00:00

I am scrambling to fix a production error and am not a JS developer.

  • 0

I am scrambling to fix a production error and am not a JS developer. Before my analysis can go any further I need to be absolutely confident that I am making some correct assumptions about the following line of code:

var iVO = {
    "images":{}
};
var thisImage = $(this).data("data");

iVO["images"][thisImage.fileKey] = thisImage;
iVO["images"][thisImage.imageType] = imageType;
iVO["images"][thisImage.uploadReason] = uploadReason;

Here are my assumptions. If any are correct or misguided, please correct me:

  • iVO is an array of JSON objects
  • Each of these JSON objects is then given 3 properties (fileKey, imageType and uploadReason)

The thing that I don’t get is the significance of the "images" index, What is the value/meaning of iVO["images"]? What does information/objects this first/outer array represent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:05:32+00:00Added an answer on June 2, 2026 at 7:05 pm

    iVO is an object literal. It functions like a hash.

    iVO["images"] looks like array access, but in this case the code is accessing the images property on iVO. In the end, it returns what images points at, which is {}, another object literal.

    var thisImage = $(this).data("data") is using a jquery function. The documentation for jQuery.data is here. thisImage is a reference to the data returned from the invocation of data

    iVO["images"][thisImage.fileKey] = thisImage;

    is just setting a value. The first access is accessing the images property on iVO, which was a an object literal. From that object literal, the code assigns the property thisImage.fileKey (whatever that is, it comes out of the data call on the previous line) the value of thisImage.

    So, when you say

    iVO is an array of JSON objects

    iVO is a single object literal, that contains another object literal under the images property.

    That object literal has 3 values stuffed in it. The keys (the named of the properties) depends on what the data call returned. The values depend on thisImage (the result of the data call), and the variables imageType, and uploadReason.

    You can use your debugger to step thru this code and see what the values are at each step.

    Note JSON is not coming into play here. From json.org, “JSON is a text format that is completely language independent….”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is probably rather simple, but I'm not at that skill level yet.
I'm looking for an efficient algorithm for scrambling a set of letters into a
I'd like to create a simple password form or script that redirects the visitor
I have a structure which I need to populate and write to disk (several
We know that for drawing on an image in qt, qpainter is used. Recently,
I need to protect images embedded in a swf file. I've noticed Swf Encrypt
I have a windows exe app that used to sends packets to a server
Note: I'm not talking about preventing the rebinding of a variable. I'm talking about
I need to construct three examples of different kinds of attacks against the CIA
I know loading unicode is a somewhat laboured point, but I can't see how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.