خرید بک لینک

Vote count: 0

how to delete a particular json element by variable:
i.e. I want to delete obj.a.b, but it is passed by a variable.
Is there a simple way to implement this?

var t = 'obj.a.b';
        var obj = {a: {b: 'b', b2: 'b2'}};
        delete t;
        console.log(JSON.stringify(obj));

; console.log(JSON.stringify(obj));

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 26 ارديبهشت 1395 ساعت: 8:30

صفحه بندی