I have a json object defined like this –
"Content" : [ "Value1",
"Value2",
{"key": "value"},
{"key": "value"}
]
I can get the length of contents since it is an array.
How do I iterate through the object, so that I can display in this format-
<div>Value1</div>
<div>Value2</div>
<div><a href=key>Value</a></div>
<div><a href=key>Value</a></div>
I am working on Javascript.
Thanks a lot!
If you had the variable
you could then do what you wanted by using a for loop like this
As you can see I did have to change your JSON slightly to make it easier on you to extract the information you want.