[{
"Id": 2,
"Stock": [{
"Id": 1,
"available": 4,
"Price": 188.03
}, {
"Id": 24703,
"available": 6,
"Price": 175.35
}, {
"Id": 49405,
"available": 10,
"Price": 249.52
}, {
"Id": 74107,
"available": 13,
"Price": 226.46
}]
Based on the above JSON object using JavaScript, how would I be able to get the value for price field based on the available field? I understand how to get the price value of, say, stock at position 1, however what I would like to do is get the price value based on the condition value.