How do I add a new key:value pair in existing JavaScript object?

Posted by basit74 on Stack Overflow See other posts from Stack Overflow or by basit74
Published on 2010-05-12T11:15:16Z Indexed on 2010/05/12 13:34 UTC
Read the original article Hit count: 153

Filed under:

I have a JavaScript object like:

appointerment= {ids: '15,16,17', appointments: {'15': '12.05.2010,14,05,2010'} }

now in appointments object I want to add something like '16': '21.05.2010'

what is the best possible way to do this?

© Stack Overflow or respective owner

Related posts about JavaScript