4

I'm working on a pipe and am having trouble with combining two lists of items.

List 1:
[0] letter - a
[1] letter - b
[2] letter - c

List 2:
[1] word - apple
[2] word - banana
[3] word - cake

I'd like something which emits the following:

List 3:
[1] letter - a
    word - apple
[2] letter - b
    word - banana
[3] letter - c
    word - cake

I can't figure out for the life of me how to do this simple operation.

Scott Wegner
  • 7,263
  • 2
  • 39
  • 55
Sam
  • 6,167
  • 6
  • 26
  • 24
  • Out of curiosity, what is Yahoo pipes? – PhiLho Dec 03 '08 at 22:45
  • @PhiLho Yahoo pipes are used to use many commands to get done your needs..... here is link for the further info. http://pipes.yahoo.com/pipes/ – Ankit Singh Dec 03 '08 at 23:34
  • I have a same kind of problem. See [http://stackoverflow.com/questions/18018784/yahoo-pipes-combine-2-rss-feeds-whereby-title-of-new-feed-consists-of-titles-of][1]. Please help me! [1]: http://stackoverflow.com/questions/18018784/yahoo-pipes-combine-2-rss-feeds-whereby-title-of-new-feed-consists-of-titles-of – user2646176 Aug 09 '13 at 15:40

1 Answers1

1

What you ask is verbose and complicated to do in Yahoo Pipes. If you still want to go through the trouble, here's my solution:

In this example, List 1 is a Yahoo search for "apples" and List 2 a Yahoo search for "oranges".

  1. The main pipe starts with a list of numbers. This list is cut to the length of List 1.
  2. Then for each number n, the n-th item of List 1 is attached to the numbered item.
  3. Then for each number n, the n-th item of List 2 is attached to the numbered item.

Finished.

You probably want to clean things up a bit. Add a proper title, remove the number value, etc.

Notes:

  1. I used alto maltés' list of numbers. It's not a part of Yahoo Pipes, so it might stop working.
  2. I used two n-th item pipes. Maybe this can be simplified.
  3. If List 2 is shorter than List 1, the last element of List 2 is used. This should be easy to change if necessary.