I wanted to extract a few data from the below json add them to a single array..
I was able to extract all the text values inside the bloc, but not able to push it to the single array.... below is the code I use to extract it
json.Blocks.map(item=>{
console.log(item.Text)
})
But dont know how to push I to a single array...like this
[
"type": "MyKad",
"id":"610522-10-5378",
"name":"CHAN MEI MEI",
"add":"NO 18 JALAN SUNGAI MASAI"
]
{
"DocumentMetadata": {
"Pages": 1
},
"Blocks": [
{
"Boundary": "0.002"
},
{
"Text": "MyKad"
},
{
"BlockType": "LINE",
"Confidence": 99.50830841064453,
"Text": "610522-10-5378"
},
{
"BlockType": "LINE",
"Confidence": 99.68528747558594,
"Text": "CHAN MEI MEI"
},
{
"Text": "NO 18 JALAN SUNGAI MASAI"
},
{
"BlockType": "LINE",
"Confidence": 99.84520721435547,
"Text": "SUBANG ALAM"
},
{
"BlockType": "LINE",
"Confidence": 99.87599182128906,
"Text": "40400 SHAH ALAM"
}
],
"AnalyzeDocumentModelVersion": "1.0"
}