Hello everyone !
I am new to postman and api creations in general , and i have a problem that i cannot find a solution , so i posted this topic!
I am trying to make a collection that gets products from a woocommerce shop via its REST API and then posts them to a different site. So i get the products , save the response to a string , map through the JSON and take the stuff i need into variables and then when i try to loop and use the shift function to remove the first item from the array so it posts a different product . My problem is that when i loop , it creates the first product and then it tries to post the same product instead of shifting to the next , i havent created the if statement that checks if the arrays are empty . i just wanted to create the 5 products that i get , and then run out of data to see how to stop the loop here are some screenshots :
(i have more screenshots but i cant embed them because i am a new member )
i dont know what i am doing wrong , i have seen some videos and followed some documentations and forum topics but i still cant find what i am doing wrong , Thanks again in advance!!