I have an external JSON file in the format {"abcd":[0,0,0],"bfff":[1,2,3]}. I am able to access the values using extfile[abcd] or extfile[bfff]. Now how do I add a new key/value pair like "ghffh":[4,5,6] into the external JSON file. I'm using express js with node.
            Asked
            
        
        
            Active
            
        
            Viewed 215 times
        
    0
            
            
        
        Akash Babu
        
- 227
 - 1
 - 4
 - 13
 
- 
                    1You figure out how to read and write to files, then you figure out how to parse and stringify JSON, then you figure out how to add a new property to an object, then you put it all together and make it work ! – adeneo Dec 17 '14 at 16:08
 - 
                    ... then you figure out how to make unhelpful comments on the internet? – Robert Levy Dec 17 '14 at 16:10
 - 
                    @RobertLevy: I think showing how to approach a problem (dividing it into subproblems and solve those) is helpful. – Felix Kling Dec 17 '14 at 16:16
 - 
                    True but you didn't show how to solve any of the sun problems, thus not really helpful – Robert Levy Dec 17 '14 at 17:03