I have the following JSON.
It is the coordonates of differents points (x,y,w,h). I need to parse this JSON with hashmap? Array? Will need coordinate for each point to use later.
How can I proceed?
{ "_id" : "543e95dddedd",
"result" : [ [ "Point1",
[ [ 22,
32,
444,
4444
] ]
],
[ "point2",
[ [ 43,
112,
442,
344
],
[ 34,
34,
1246,
44
]
]
]
]
}
With this, I can display the JSON correctly in "points":
app.get('/id/:id', function (req, res){
return Coordonate.findById(req.params.id, function (err, points) {
if (!err) {
return res.send(points);
} else {
return console.log(err);
}
});
});
Thanks for you help!