[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Access Values of Cell Array deeply nested within Structure Array
From: |
babelproofreader |
Subject: |
Access Values of Cell Array deeply nested within Structure Array |
Date: |
Wed, 15 Apr 2020 13:22:48 -0500 (CDT) |
I have a nested structure_array/cell_array/structure_array of character
values which is the result of a web query which returns a converted JSON
object, the needed numeric value(s) of which I can access in a loop thus:
str2double( S.orderBook.buckets{ loop_ix }.price )
However, I was wondering whether there is a quicker/more elegant way of
getting these values? At the moment, for my purposes, I am having to run a
"look up" for loop that encloses an "if statement" to get in the ballpark of
the required numeric values, and then run a second for loop in the region of
the ballpark to extract these required values.
Note: Cross posted at
https://stackoverflow.com/questions/61233692/access-values-of-cell-array-deeply-nested-within-structure-array
<https://stackoverflow.com/questions/61233692/access-values-of-cell-array-deeply-nested-within-structure-array>
--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- Access Values of Cell Array deeply nested within Structure Array,
babelproofreader <=