I wouldn't really call this a scraping problem, but I guess you could call this sort of data conversion part of a scraping problem. It seems like all the data you need exists in the table passed to that "Mapper" call, all you need to do is convert it to a format you can use in Lua.
If you want to do this in an automated way, you'll probably want to use some sort of scripting language that can load JSON, load that table in there, parse it that way, and output some Lua table you can include in your addon. Perhaps a local install of Lua can do things like this, but I really don't know. I imagine languages like Python, Perl or Ruby would be how most people go about things like that.
I looked at
http://static-azeroth.cursecdn.com/1...574/js/core.js to understand what the "pins" array is. Running the Mapper function through a pretty printer shows this:
Code:
function f(G) {
var F = G >> 9;
var H = G & 511;
return [F / 5, H / 5]
}
This is what turns a "pin" into a coordinate pair. For example the "pin" 83265 in Ironforge results in x = (83265 >> 9) / 5 = 32.4, and y = (83265 & 511) / 5 = 64.2. That results in a pin at 32.4,64.2 which is correct. You could probably do that part in Lua or in your pre-processing, whichever works best for you.
Also it may be worth noting that if this data isn't something you'll need to convert often, you could probably do some amount of work just with some regular expression find-and-replace on that huge table, instead of loading it as JSON and running the tree, etc. But this might make converting pins more difficult if that is needed in the pre-Lua stage.
As for stuff like how to convert its "floors" and zone names to something easier for you to use, I'm not sure what your options are. There may be Lua libraries or something to help you there, but there may not be either.