"need some help with loop operators"

kaymankayman MemberPosts:662Unicorn
edited June 2019 inHelp
Maybe it's my old school view on the topic, but I'm failing to get the loop concept understood / working.

In short this is what I want to do :

- I have a repository containing JSON snippets that I crawled from the web.
- I want to loop through this repository, and for every row I want to use the Json to XML operator so I can merge this with other data from the crawled pages .

My approach was to do it as follows ;

(1) Retrieve the dataset
(2)循环的例子
(3) for every example -> data to documents
(4) JSON to XML
(5)圣ore XML
(6) Merge data and do some magic

But it only seem to work in theory, can someone advise me on the best way to tackle this ? If I can get (1) to (3) i can figure out the rest myself, but I'm stuck and it's driving me nuts...

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    have a look at the process below. It iterates over a repository folder via "Loop Repository" (and only takes IOObjects following the specified naming pattern) and then a "Loop Examples" operator moves over each row of an example set. The content of a predefined attribute is then converted to a document. After that, you could do whatever you like with those documents.






    <宏/ >





































    Regards,
    Marco
  • kaymankayman MemberPosts:662Unicorn
    Thanks Marco,

    I simply overlooked the fact that the loop operator allows you to loop, but doesn't do anything unless you tell it to (or something like that...).
    Once I realized that it was fairly straightforward:)
Sign InorRegisterto comment.