I have an object that i need to insert in the front(first index) of an array of object.
const static_stat = {id: null, name: 'UNASSIGNED'};
api_data = [{id:.., name:..},{id:.., name:..},{id:.., name:..}];
I've tried using unshift, What I want is to achieve the result below, but it gives me the length of the array instead.
[{id:null, name: 'UNASSIGNED'},{id:.., name:..},{id:.., name:..},{id:.., name:..}]