Here is code.When i run this code it's to get the data product_id, it's showing alert undefined.but I want to get Latitude Longitude with every 10 secs update.kindly share any idea ASAP
- <script type="text/javascript">
- startJsonSession();
- function startJsonSession(){
- $.ajax({
- url: "next28.php",
- cache: false,
- dataType: "json",
- complete: function(data) {
- pid = data.Latitude;
- alert(pid);
- }
- });
- }
- <script>
JSON output from next28.php:
{"LiveDataJSon":[{"Latitude":11.712140,"Longitude":78.054493,"Speed":0.00,"PositionTime":"16/Mar/2019 11:18:18 AM","PositionType":"GPS","Direction":"East","ACC":"Off","Battery":"100%","GSMStrength":"Strong Signal","PowerStatus":"Power Connected"}]}