I have a json object:
var deniedTimeIDs = JSON.parse('[808,809,812,811,814,815]');
so, I want to add/remove data from this object by jquery. How to do it? can I convert it to Array?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Below will give you a javascript object,
You can then use .push & .pop to add/remove element into the array.
Further Readings,
JSON.parse, Array.push, Array.pop