There is an object which always has a different name.
Example: {0.8337090382971908: "DELETED"}
how can i get his name and status?
There is an object which always has a different name.
Example: {0.8337090382971908: "DELETED"}
how can i get his name and status?
You can use Object.keys()
and Object.values()
respectively along with Array Destructuring:
const obj = {0.8337090382971908: "DELETED"};
const [ name ] = Object.keys(obj);
const [ status ] = Object.values(obj);
console.log(name);
console.log(status);