Is it a feasible solution to keep make arrays with _ids from mongodb database in front-end part? Let us suppose that I need to maintain the status of people with their ids . Is it good to associate things like this:
let arr=[];
arr['5bbaea8847910db52c7c3682']='p';
arr['5b9f6a1fd85effbb8acbd1fe']='a';
console.log(arr['5b9f6a1fd85effbb8acbd1fe']);
or Is It better to keep things like this :
let arr=[];
arr.push({
_id:5bbaea8847910db52c7c3682,
status:'p'
});
I fear if such big ids may lead to memory problems or such things. I have been a C++ programmer previously so it does not appear to be a cool thing to do. Is it OK to do such things in JavaScript ?