Currently, the AWS Post Request sends a JSON with one key, data, which contains the actual JSON stringified.
Server side, we have to do req.body.data[0].id to get the id and req.body.data[0].lat to get the latitude.
Change this so we only need to do req.body.id for the id and vice versa for latitude.
Currently, the AWS Post Request sends a JSON with one key, data, which contains the actual JSON stringified.
Server side, we have to do
req.body.data[0].idto get the id andreq.body.data[0].latto get the latitude.Change this so we only need to do
req.body.idfor the id and vice versa for latitude.