JSFiddle - React, Tailwind, and code Playground

by Drath

JavaScript

//Unique IDS would use UUID/GUID implementation?
var active = {
    uniqueid: {
        test: 1
    },
    uniqueid2: {
        test: 2
    },    
    uniqueid3: {
        test: 3
    },
};
var inactive = {};

console.log(inactive);
console.log(active);

//Iteration
var actives = Object.keys(active);
for (var i = 0; i < actives.length; i++) {
    if (active[actives[i]].test) { //Get a property
        //
    }
}

//Move something
inactive.uniqueid2 = active.uniqueid2;
delete active.uniqueid2;

console.log(inactive);
console.log(active);