How can I completely remove an object from an array in Javascript? -


i have been using following code:

formdata.objectivedetails.push(emptyobjectivedetail); 

this pushes new emptyobjectivedetail object onto end of array called objectivedetails.

if example array of objectivedetails contains 13 objects how remove 1 @ position 5? assume make null want remove length of array becomes 12.

this might off topic have been considering adding underscore.js. done underscore?

using underscore.js

objectivedetails = _.without(objectivedetails, _.findwhere(arr, {id: 5})); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -