I have the following output:
let obj = {
id:"111",
name:"sven",
nicknames:{
name1:"svini",
name2:"sivi"
}
cars: {
car1 : "BMW",
car2 : "mercedies"
}
}
how can i map this obj to this output?:
convertedObject = {
id:"111",
name:"sven",
nicknames:"svini",
cars:"BMW"
}
so if the object inside the original object has more than one element then take the first element of that object
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…