Looking to choose a single element from one array out of multiple elements in another array. Here is the structure of the array:
{
"f": "Book2.csv",
"v": 0,
"vs": ["Year", "Month", "Customer_ID", "Collateral", "Exposure_amount"],
"xs": ["Customer_type", "Region", "Collateral_type", "Collateral_value"],
"y": 1,
"x": 0,
"ys": ["Customer_type", "Region", "Collateral_type", "Collateral_value"]
}
I am attempting to extract "Customer_type" from the "xs" array.
var custype = data["xs"][data["x"]];
An error has occurred:
SyntaxError: missing ; before statement
How can this issue be resolved?