1

I have this json

["ESp", "lBe", "IBp"]

and i want to append "abc" to it so it can look like this:

 ["ESp", "lBe", "IBp", "abc"]

I have tried some methods but all of them add attributes and i don't want attributes , only values. Thanks

2
  • 2
    Your "json" is just an array... I think you need to post more Commented Feb 11, 2016 at 19:30
  • What did you try? The example you gave is an array. Commented Feb 11, 2016 at 19:30

1 Answer 1

2

Unless there is more to your array than I can see, this should work:

var myList = ["ESp", "lBe", "IBp"];
myList.push("abc");
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! that was helpful!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.