Sunday 3 June 2018

Remove object from a JavaScript Array?


Possible Duplicate:
Remove specific element from a javascript array?






Specifically I have an array as follows:



var arr = [
{url: 'link 1'},

{url: 'link 2'},
{url: 'link 3'}
];


Now you want to remove valuable element url "link 2" and after removing the only arrays as follows:



arr = [
{url: 'link 1'},
{url: 'link 3'}

];


So who can help me this problem? Thanks a lot

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...