I have a situation where I want to execute web services on priority basis using nodejs. Here is the pseudo code which is stored in an array.
{
   webservice2.input : webservice1.ouput;
   webservice2.input : webservice3.output;
}
Now how to set the priority so that first webservice1 is running to get the input for webserivce2 and second webservice3 and finally webservice2.
Priority should be stored in array like [webservice1,webservice3,webservice2]
Any help on this will be really helpful.
Thanks.