jquery getting value from getJSON -
i;m trying value 'content'
json data
this data:
[{"pk": 2, "model": "template", "fields": {"content": "message", "status": "draft", "user": 16, "name": "test", "created": "2013-05-19t20:59:04z"}}]
this have tried:
$.getjson('/sms/fetch/' + id, function (data) { $('#id_content').val($('#id_content').val() + data.fields.content); })
but not seem value, value within call shown above.
it's array, so: data[0].fields.content
Comments
Post a Comment