INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Combine 2 List to one  (Read 1265 times)

fredele

  • World Citizen
  • ***
  • Posts: 165
Combine 2 List to one
« on: March 07, 2014, 05:13:06 pm »

Hello !

This one is for the 'expression' specials :
Here's the problem, I've 2 list, one contains the actors of a film, the second the character
as an example

-for the actors :

Jack Nicholson
Faye Dunaway
John Huston
...

-for the Characters :

Jake Gittes
Evelyn Cross Mulray
Noah Cross
...

-And I want a Result as, you gess :

Jack Nicholson as Jake Gittes
Faye Dunaway as Evelyn Cross Mulray
John Huston as Noah Cross
...

It must be something like Listbuild( Listitem([Actor],i) , Listitem([Character],i)) , but there's no 'for' i to have a loop  :P ?

I must be near the thing, but  ...

Thanks for your help !
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Combine 2 List to one
« Reply #1 on: March 07, 2014, 05:17:26 pm »

There's nothing to combine the way you want, since you can't iterate over items to create the 1-1 actor/role correspondence.  Assuming the actors and roles are in the correct position in each list, you could use a long sequence of ListItem() calls, one per actor/role pair.

Or you could use an external script to process the items for you.
Logged
The opinions I express represent my own folly.

fredele

  • World Citizen
  • ***
  • Posts: 165
Re: Combine 2 List to one
« Reply #2 on: March 07, 2014, 05:21:08 pm »

OK , thanks, will take a look at that !

Always a so rapid answer, here.

Awesome, really !
 :D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Combine 2 List to one
« Reply #3 on: March 07, 2014, 05:24:48 pm »

You're welcome.  I just watched that classic recently.  "The future, Mr. Gittes. The future!"

Ask if you need a scriptlet to do the job.
Logged
The opinions I express represent my own folly.

fredele

  • World Citizen
  • ***
  • Posts: 165
Re: Combine 2 List to one
« Reply #4 on: March 07, 2014, 05:36:46 pm »

I' ll try on my own.

The thing is, i' ve written a little app in Delphi, who connects to Themovie.org database, API JSON powered.
You'll here about that tomorrow on the french section, I worked with another guy from france, trying to make a stable thing.
I' m not a programmer,just a hobby guy, but more or less happy with what I've done : not perfect but does the trick.
So , adding a field or more, i'll compute it myself in the app.

This 'could' be a reasonnable 'add-on' for the european, cause the API is in french, german, italian , so forth .. ;D


Logged
Pages: [1]   Go Up