I have a string [{"Latitude":8.55701,"Longitude":76.880934},{"Latitude":8.55701,"Longitude":76.880935},{"Latitude":8.55701,"Longitude":76.880935}]
I want output as [{8.55701,76.880934},..etc]
only numbers.
This is a JSON string -
<script type="text/javascript">
var myVar = ' <%= request.getAttribute("Map") %>'; /* retrieve json from request attribute */
var result = myVar.split(',',2);
var latitude = parseFloat(result[0].replace('"Latitude":',''));
var longitude = parseFloat(result[1].split(':'));
alert(latitude);
</script>
I have tried but not getting it.