0

I have to adjust all the lat points(more than a thousand) of my Json file by adding 0.035. How can I do that dynamically?

Update

I'm really not a expert in development, so I've tried to open the json file in UltraEdit and to use a script like this:

UltraEdit.activeDocument.top();
var latToChange = 48+".";
latToChange = parseInt(latToChange);
var n;
for (n = 0; n < 1115; n++) {
  if (latToChange) {
   latToChange = latToChange + 0.035;
 }

}

1 Answers1

0

Iterate your JSON object and increment each lat value by 0.035.

This answer has an overview of how to iterate a JSON object with plain javascript:

https://stackoverflow.com/a/684692/187954

for (var key in p) {
  if (p.hasOwnProperty(key)) {
    alert(key + " -> " + p[key]);
  }
}
Community
  • 1
  • 1
Michael Robinson
  • 29,278
  • 12
  • 104
  • 130