It's an array of objects - access the specific object first using group[0]
then access the property you want with group[0].name
.
const group = [{ name: "test01" }]; const res = group[0].name; console.log(res);
Based on what you have you can call your propriety if it's an object or an array of objects.
const object = { name: "test1", group: "c2" } console.log(object.name) const array = [{ name: "test1", group: "c2" }] console.log(array[0].name)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.