Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

How to create a plist array's item using node.js or any javascript code ..

I have a function that reads json and converted it to plist,

My output is like:

How can I have it as:

share|improve this question
    
Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on Stack Overflow. See "Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?. BTW, it's "Thanks in advance", not "Thanks in advanced". –  John Saunders May 5 at 2:58

1 Answer 1

up vote 1 down vote accepted

You have to create an entry for each element in emergencyNumbers. This would do it:

 featuresPlistOutput += emergencyNumbers.map(function(number) { 
    return '<string>' + number + '</string>';
 }).join('\n') + '\n';

(instead of featuresPlistOutput += ' <string>' + emergencyNumbers + '</string>\n';)

share|improve this answer
    
Thanks alot, It is working great –  Mark Mar 31 at 17:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.