I got this little json file:
{
"description": {
"is_a": "AnnotationProperty",
"labelEN": "description",
"labelPT": "descrição"
},
"relevance": {
"is_a": "AnnotationProperty",
"domain": "Indicator",
"labelEN": "relevance",
"labelPT": "relevância"
},
"title": {
"is_a": "AnnotationProperty",
"labelPT": "título",
"labelEN": "title",
"range": "Literal"
}
}
I need to build a tree looking for the "is_a" field and the name before this field. Once I got these two fields, I can insert the child one on the tree in the right place.
So, using javascript, how can I get the name and the field "is_a" of each one?
I would like to have a loop statement that gives me all the names and "is_a" fields, for example, first time it gives me "description" and "AnnotationProperty" and the second iteration it gives me "relevance" and "AnnotationProperty", etc.
Thanks.