array of associative array
concatinated key list with dot (ex. 'type.name.0.info')
Optional
defIn: anydefault value if value is not found (OPTIONAL)
value if found otherwise returns def
This function returns the value of an array or associative array which referred by a concatinated key list string. If a value for key is not defined, it returns 'undefined' by default. When an optional argument 'def' is specified and a value for key is not defined, it returns a value of 'def'.
let p = {
fruit: apple,
info: [
{ toy: 4 },
{ pen: 6 }
]
};
aryval(p, 'fruit') -> "apple"
aryval(p, 'info') -> [{toy: 4},{pen: 6}]
aryval(p, 'info.1') -> {pen: 6}
aryval(p, 'info.1.pen') -> 6
aryval(p, 'money.amount') -> undefined
aryval(p, 'money.amount', null) -> null
get value of array by key name list