Convering object into Array
//this is your object
let myObj = {CountryID: 87944818, ISO2: "do", ISO3: "u", Name: "aliqua sit magna tempor"}
// create an empty array
let myArr = [];
// push your object into arry
myArr.push(myObj);
//check using type of method
console.log(myArr);
let myObj = {CountryID: 87944818, ISO2: "do", ISO3: "u", Name: "aliqua sit magna tempor"}
// create an empty array
let myArr = [];
// push your object into arry
myArr.push(myObj);
//check using type of method
console.log(myArr);
Comments
Post a Comment