I have following steps all in one function
step 1 - input validation
step 2 - building db query for substring search
step 3 - query from db - adverts and users (uses the query build in step 2) 1st query
step 4 - query from db - advert images (uses the results from step 3) 2nd query
last step - output xml
{ '@': { id: 'BR617' },
type: 'babysitter',
title: '',
description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',
price: 28,
postcode: 'SE9 6JY',
latitude: 51.458798,
longi
When I console.log(row) in step 3 the log is displayed after last step.
---------------------
I tried using q to run like synchronize but step 3 console.log(row) is still displayed after last step.
thanks guys.