let data = [
{
id: 1,
price1: 5,
price2: 4
}
let data1 = [
{
id: 1,
price: {
price1: 6
}
}
]
let data2 = [
{
id: 1,
price: {
price1: {
price2: 7
}
}
}
]
// vlaue key
test(data, "price1,price2")
test(data1, "price.price1")
test(data2, "price.price1.pricew")
function test (data, price) {
}