Reputation: 24059
I need an array of languages in package.json, I've tried:
"langs": {
"en", "es"
}
But it's not valid.
How can I store an array of languages in my package.json file?
Upvotes: 0
Views: 86
Reputation: 579
Use square brackets [] instead of curly braces {}.
Curly braces are for objects: "dog":{'name':'foobar'}
More info on syntax here: http://www.w3schools.com/json/json_syntax.asp
Upvotes: 2
Reputation: 2875
"langs": ["en", "es"]
Should work, so just replace your {
with [
and }
with ]
.
Upvotes: 1