I have data like this :
array: [
0: [
0: {fruits: "apple", price: "15000"},
1: {fruits: "orange", price: "12000"},
],
1: [
0: {fruits: "grape", price: "13000"},
1: {fruits: "chery", price: "14000"},
2: {fruits: "longan", price: "12000"},
],
2: [
0: {fruits: "manggo", price: "16000"},
1: {fruits: "dragon fruit", price: "17000"},
2: {fruits: "avocado", price: "18000"},
3: {fruits: "coconut", price: "19000"},
],
]
I wanna ask how to know the length of the second data, I already try using nested loop but the result is not same with my expectation my data come like this :
array: [
0: {fruits: "apple", price: "15000"},
1: {fruits: "orange", price: "12000"},
2: {fruits: "grape", price: "13000"},
3: {fruits: "chery", price: "14000"},
4: {fruits: "longan", price: "12000"},
5: {fruits: "manggo", price: "16000"},
6: {fruits: "dragon fruit", price: "17000"},
7: {fruits: "avocado", price: "18000"},
8: {fruits: "coconut", price: "19000"},
]
and when I try to count all my data the result : 9, and how to count my total object inside my array? Expectation Result :
array 0 = 2, array 1 = 3, array 2 = 4