How i can read custom_fields
object from this response in javascript ?
{
"status": "ok",
"post": {
"id": 25,
"type": "post",
"slug": "price-list",
"url": "http://example.com/2016/02/10/post-title/",
"status": "publish",
"title": "title",
"title_plain": "title",
"content": "",
"excerpt": "",
"date": "2016-02-10 12:23:40",
"modified": "2016-06-01 06:27:39",
"categories": [],
"tags": [],
"author": {
"id": 1,
"slug": "slug",
"name": "name",
"first_name": "first name",
"last_name": "last name",
"nickname": "nickname",
"url": "",
"description": "descp"
},
"comments": [],
"attachments": [],
"comment_count": 0,
"comment_status": "open",
"custom_fields": {
"Regular 95": [
"34200:1"
],
"Super 98": [
"34900:0"
],
"Gasoil": [
"26100:-1"
],
"Diesel": [
"26200:1"
],
"Kerosene": [
"20100:-1"
],
"Fuel / Ton": [
"773.30:0"
]
}
},
"previous_url": "http://example.com/2016/02/10/post-title/",
"next_url": "http://example.com/2016/02/10/post-title/"
}
Used
$.each
From w3c doc, diferents ways to accessing JavaScript Properties:
You can use chaining with nested objects