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

  • Home
  • SEARCH
  • 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 6129343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:43:53+00:00 2026-05-23T16:43:53+00:00

{ ‘lastChangedName’: null’Caption’: ‘Adhesive Tape’, ‘CreateByID’: 0, ‘DateOnSet’: ’02/10/2011′, ‘Note’: ‘Currently participating in Allergy

  • 0
{
  'lastChangedName': null'Caption': 'Adhesive Tape',
  'CreateByID': 0,
  'DateOnSet': '02/10/2011',
  'Note': 'Currently participating in Allergy shots to resolve this',
  'Reaction': 'skin rash',
  'SectionDescription': 'Allergy List',
  'HistoryItemID': 1831,
  'CurrentInDrFirst': 0,
  'CreateDate': '/Date(1297674300000-0500)/',
  'Code': '3746',
  'PL': '1',
  'Problem': {
    "LastChargedByUserID": 0,
    "LastChargedDate": null,
    "ProblemStatus": 1003,
    "DateResolved": "12\/2\/11",
    "PatientID": 0,
    "ProblemID": 1330
  },
  'CategoryDescription': null,
  'CategoryID': 0,
  'CodeSystem': 'FDBDRUG',
  'SectionID': 3,
  'LastChangedID': 0,

},
{
  'lastChangedName': null'Caption': 'Cats',
  'CreateByID': 0,
  'DateOnSet': '6/4/1997',
  'Note': '0',
  'Reaction': 'Sneezing',
  'SectionDescription': 'Allergy List',
  'HistoryItemID': 1925,
  'CurrentInDrFirst': 0,
  'CreateDate': '/Date(1299176220000-0500)/',
  'Code': '',
  'PL': '1',
  'Problem': {
    "LastChargedByUserID": 0,
    "LastChargedDate": null,
    "ProblemStatus": 1002,
    "DateResolved": null,
    "PatientID": 0,
    "ProblemID": 1331
  },
  'CategoryDescription': null,
  'CategoryID': 0,
  'CodeSystem': '',
  'SectionID': 3,
  'LastChangedID': 0,

}

This is the response i get, i want to iterate and print out the caption values… in a text box…

for each(var item in response) {
          alert(item.caption)
}

This only prints me the first caption alone.

  • 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-05-23T16:43:54+00:00Added an answer on May 23, 2026 at 4:43 pm

    That response, as quoted, is awkward because you have a series of anonymous objects separated by commas (you might think it was invalid, but it’s not, it’s just unhelpful). (That’s assuming you fix the 'lastChangedName': null'Caption' thing that symcbean pointed out in the comments; I assume that’s a copy-and-paste error.) I think there must be more to it than what’s quoted. (Is it, perhaps, inside [ and ], making it an array of objects?)

    But generally speaking: Yes, for..in (not for each, just for) is used to loop through the names of the properties of an object, and once you have each name, you can use [] notation to retrieve the property value.

    So if you can get a reference to each of those objects, you can use for..in to loop through the properties.

    Example:

    var obj, name;
    
    obj = {
        foo: "bar",
        answer: 42
    };
    
    for (name in obj) {
        console.log(name + ": " + obj[name]);
    }
    

    That will show

    foo: bar
    answer: 42

    or

    answer: 42
    foo: bar

    The order of the property names in the loop is not specified for generic objects like those in your example. (It’s specified for Array objects: With Array objects it’s guaranteed that any properties they have with purely numeric names — e.g., array indexes — will be iterated in numeric order. [Even then, if you have non-numeric properties on the array as well, it’s undefined whether those will be before, after, or intermixed with, the numeric ones.])

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

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I was writing code for dragging mechanism which invokes to wait for small period
I've got a string that has curly quotes in it. I'd like to replace
I downloaded PostgreSQL from the official website and ran the .dmg installer. After that
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to create a RegEx expression that will successfully parse the following

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.