wideEyedPupil wrote:
Javascript seems heavily dependent on the DOM.
Yes but it's also a scripting language in it's own right...
I know and I'm quite fond of it. I didn't used to be but it is growing on me. Still, it runs in the context of a web browser, as far as I know. My comment above asking for a link was only half in jest. This week is awfully busy for me. If I can remember it by next Tuesday, I will then have a chance to look at it.
It doesn't have any I/O capabilities.
Then node.js is in trouble as a server side JS replacement for php scripts isn't it! The method I am using ATM is just to embed a data object in JSON format.
ie data =
[
["foo","bar"],
["lah","lah],
…
]
I have a CSV file I manually converted using GREP find&replace commands in TextWrangler.
I might go for HTML or some other environment (Apple's QC) where I can generate interaction/outputs when I get my script up to scratch. I'm just trying to parse the data for duplicate records but need to merge duplicates in case by case way... Starting to think Applescript in Excel might be preferable since the CSV->JSON manual conversion was a pain. There seem to be scripts to do CSV conversion to an array on stackoverflow.com
I try to avoid AppleScript because I don't have much good to say about it. Perhaps you should explain exactly what you want to accomplish. CSV and JSON shouldn't be a pain. Both were created because they were fall-of-a-log easy.