Convert JSON into array dataType
Posted
by
Myhome Stories
on Stack Overflow
See other posts from Stack Overflow
or by Myhome Stories
Published on 2014-08-25T04:12:51Z
Indexed on
2014/08/25
4:20 UTC
Read the original article
Hit count: 142
I have the following JSON string
var json = {"result":[{"address":" Ardenham Court, Oxford Road ,AYLESBURY, BUCKINGHAMSHIRE ,UNITED KINGDOM","picture":"1.jpg","uniqueid":"8b54275a60088547d473d462763b4738","story":"I love my home. I feel safe, I am comfortable and I am loved. A home can't be a home without our parents and our loved ones. But sad to say, some are experiencing that eventhough their loved ones are in their houses, they are not loving each other. There is a big war. You can't call it a home."}]}
I want to get address ,picture,story separately for accomplish this. I tried recent answers in stackoverflow, but I was not able to achieve it.
Below is what I have tried,
$.each(json.result.address, function (index, value) {
// Get the items
var items = this.address; // Here 'this' points to a 'group' in 'groups'
// Iterate through items.
$.each(items, function () {
console.log(this.text); // Here 'this' points to an 'item' in 'items'
});
});
© Stack Overflow or respective owner