我有以下JSON对象:
我不确定如何在Javascript中将其解析为可用的变量。
使这一点变得棘手的一点是名称并不总是相同的。
materialid可以命名为othernameid。
标题可以命名为somethingelsetitle。
我需要能够动态地了解每个名称及其价值。
谢谢!
{
"3":[
{
"materialid":3,
"title":"New Titlted Stuff",
"description":"Description of Stuff",
"datecreated":"05/09/2018",
"keywords":"Keywords about stuff",
"material":"7_html_logo.png"
}
],
"4":[
{
"materialid":4,
"title":"ABC title",
"description":"ABC desc",
"datecreated":"05/23/2018",
"keywords":"ABC Keywords",
"material":"8_angular_logo.png"
}
],
"5":[
{
"materialid":5,
"title":"4th try",
"description":"describe 4th thing",
"datecreated":"05/14/2018",
"keywords":"4th thing keywords",
"material":null
}
]
}