Actually, it is very easy, once you know it. Let’s use this feed: “https://daisycon.io/datafeed/?filter_id=34842&settings_id=5150&demo“. If you see this download, you will see that there are some nodes that are repeated continuously, in this case, they are called ‘product’. You need this depth. To get back to this, you only have to count up each step until you’re at the top of the file. From a product point of view, this is as follows:
- product: 1
- products: 2
- program: 3
- programs: 4
- datafeed: 5
The unique node depth is 5. The application will try to parse any node on this depth and make it a product. For example, he will also close “id”, “name”, “currency” into the “program_info” node, but because there is no valid product here, these nodes will be ignored.