标签云

微信群

扫码加入我们

WeChat QR Code


that's not an object, it's an "array" of objects.

2018年10月23日43分09秒

window.MyCheckedCourses is an array, not a jQuery object.

2018年10月23日43分09秒

Where is the jQuery?

2018年10月23日43分09秒

As everyone else has said, that's an array of objects, and has nothing to do with jQuery. You case just use MyCheckedCourses.splice(startIndex, count); to remove whichever elements you want from the array.

2018年10月23日43分09秒

Thanks so much for everyone's help. How would I remove a single object from the JavaScript array of objects based on both the courseID and endDate values of the object I want removed?

2018年10月23日43分09秒

Although id makes me think of "unique" (and I know the title says "single object", but that could mean a "single object" in several places), if there are possible multiple matches, you'll have to (remove the break; and) loop backwards

2018年10月23日43分09秒

You're right Ian, I'm going to update my answer.

2018年10月23日43分09秒