{
"pkg1" : "Package name",
"pkg2" : "Price $0.00",
"pkg3" : "Long description sentence."
}
Using this jQuery:
$.getJSON("package.json", function (data) {
$.each(data, function (key, value) {
$("<p/>").attr("id", key).html(value).appendTo("#content");
});
});
How can I structure a JSON file to have 2 dimensions?
And how can I tell jQuery to find a certain catagory?
I was thinking of using
if (key == "package1"){

New Topic/Question
Reply


MultiQuote



|