Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Problem
- **GIVEN**: Deeply nested structure of objects.
- **Find**: "Address of" a particular string property.
- # Example
- ## Input
- ```javascript
- var sequence3 = {
- name: "sequence",
- args: [
- {
- name: "home_all",
- args: []
- },
- {
- name: "wait",
- args: [{ val: 5000 }]
- },
- {
- name: "if_statement",
- args: [{
- lhs: "temp",
- rhs: 100,
- operator: ">",
- sequence_id: 2
- }]
- }
- ]
- };
- ```
- ## Usage
- ```javascript
- searchFor("sequence_id", sequence3);
- // => [["args", 2, "args", 0], [/* Second result here, if any */]]
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement