Looping through records

If I have a json response lets say of purchase transactions from an API, is there a way to create a loop or for each command to iterate through each item in the array and get the specific data fields?

The goal is to be a user and view all transactions and then email all the data elements without opening each one.

First time here so all the help is appreciated!

Welcome to the community @zmbaker !

Yeah you can use the ‘jq JSON Processor’ brick to get that data - here are the official docs.
If you can share a snippet of the returned JSON I can help you figure it out too!

{"transaction_details":[{"transaction_info":{"transaction_id":"40306532SW243610K","transaction_event_code":"T0400","transaction_initiation_date":"2022-04-05T10:53:08+0000","transaction_updated_date":"2022-04-05T10:53:08+0000","transaction_amount":{"currency_code":"USD","value":"-14000.00"},"transaction_status":"S","bank_reference_id":"1019385052473","ending_balance":{"currency_code":"USD","value":"1245.93"},"available_balance":{"currency_code":"USD","value":"1245.93"},"protection_eligibility":"02","instrument_type":"PAYPAL"},"payer_info":{"address_status":"N","payer_name":{}},"shipping_info":{},"cart_info":{},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"2HR42TPC6LYTQ","transaction_id":"2FR44320RK4654704","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-05T14:46:47+0000","transaction_updated_date":"2022-04-05T14:46:47+0000","transaction_amount":{"currency_code":"USD","value":"55.70"},"fee_amount":{"currency_code":"USD","value":"-2.43"},"shipping_amount":{"currency_code":"USD","value":"11.70"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1299.20"},"available_balance":{"currency_code":"USD","value":"1299.20"},"invoice_id":"151866520","custom_field":"[%eci151866520|a5d5757c25eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"2HR42TPC6LYTQ","email_address":"myint309@gmail.com","address_status":"Y","payer_status":"Y","payer_name":{"alternate_full_name":"Norman Ware"},"country_code":"US"},"shipping_info":{"name":"Norman Ware","address":{"line1":"18878 Bethpage Drive","city":"Lewes","country_code":"US","postal_code":"19958"}},"cart_info":{"item_details":[{"item_code":"1733226","item_name":"Crystal Nuns Cathedral CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151866520"},{"item_code":"1720794","item_name":"It's Not Them. It Couldn't Be Them. It is Them! CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151866520"},{"item_code":"1699249","item_name":"Earth Man Blues CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151866520"},{"item_code":"1706954","item_name":"Clang Clang Ho CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151866520"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"EE27V7TDDYGD4","transaction_id":"6HK35420ET1315312","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-05T18:13:51+0000","transaction_updated_date":"2022-04-05T18:13:51+0000","transaction_amount":{"currency_code":"USD","value":"28.90"},"fee_amount":{"currency_code":"USD","value":"-1.50"},"shipping_amount":{"currency_code":"USD","value":"10.90"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1326.60"},"available_balance":{"currency_code":"USD","value":"1326.60"},"invoice_id":"151874483","custom_field":"[%eci151874483|96b404a3c0eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"EE27V7TDDYGD4","email_address":"tim.lendabarker@gmail.com","address_status":"Y","payer_status":"N","payer_name":{"given_name":"Timothy J","surname":"Lendabarker","alternate_full_name":"Timothy J Lendabarker"},"country_code":"US"},"shipping_info":{"name":"Timothy Lendabarker","address":{"line1":"4164 Arthur Avenue","city":"Brookfield","state":"IL","country_code":"US","postal_code":"60513"}},"cart_info":{"item_details":[{"item_code":"1739776","item_name":"Our Gaze LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"18.00"},"item_amount":{"currency_code":"USD","value":"18.00"},"total_item_amount":{"currency_code":"USD","value":"18.00"},"invoice_number":"151874483"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"E8LGTP5T9CYTE","transaction_id":"16C59702AP488192H","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-06T12:24:30+0000","transaction_updated_date":"2022-04-06T12:24:30+0000","transaction_amount":{"currency_code":"USD","value":"41.75"},"fee_amount":{"currency_code":"USD","value":"-1.95"},"shipping_amount":{"currency_code":"USD","value":"12.75"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1366.40"},"available_balance":{"currency_code":"USD","value":"1366.40"},"invoice_id":"151913575","custom_field":"[%eci151913575|f1b9c94dd3eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"E8LGTP5T9CYTE","email_address":"turdboy76rox@gmail.com","address_status":"Y","payer_status":"Y","payer_name":{"given_name":"TW","surname":"Lott","alternate_full_name":"TW Lott"},"country_code":"US"},"shipping_info":{"name":"TW, Lott","address":{"line1":"1212 Richmond Ave","city":"Waycross","state":"GA","country_code":"US","postal_code":"31501"}},"cart_info":{"item_details":[{"item_code":"1739776","item_name":"Our Gaze LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"18.00"},"item_amount":{"currency_code":"USD","value":"18.00"},"total_item_amount":{"currency_code":"USD","value":"18.00"},"invoice_number":"151913575"},{"item_code":"261683","item_name":"Brown Submarine CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151913575"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"6PJ3APVX5Z8Q8","transaction_id":"1AD85025VS056535K","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-06T13:51:43+0000","transaction_updated_date":"2022-04-06T13:51:43+0000","transaction_amount":{"currency_code":"USD","value":"27.70"},"fee_amount":{"currency_code":"USD","value":"-1.46"},"shipping_amount":{"currency_code":"USD","value":"11.70"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1392.64"},"available_balance":{"currency_code":"USD","value":"1392.64"},"invoice_id":"151916677","custom_field":"[%eci151916677|b65f17fa45eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"6PJ3APVX5Z8Q8","email_address":"willykarlin@yahoo.com","address_status":"Y","payer_status":"N","payer_name":{"given_name":"William","surname":"Karlin","alternate_full_name":"William Karlin"},"country_code":"US"},"shipping_info":{"name":"William, Karlin","address":{"line1":"40 Ocean Parkway","line2":"6D","city":"Brooklyn","state":"NY","country_code":"US","postal_code":"11218"}},"cart_info":{"item_details":[{"item_code":"1563753","item_name":"Space Gun LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"16.00"},"item_amount":{"currency_code":"USD","value":"16.00"},"total_item_amount":{"currency_code":"USD","value":"16.00"},"invoice_number":"151916677"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"FMFD96G4QKZGJ","transaction_id":"1SL00987W3463004G","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-06T19:07:15+0000","transaction_updated_date":"2022-04-06T19:07:15+0000","transaction_amount":{"currency_code":"USD","value":"40.70"},"fee_amount":{"currency_code":"USD","value":"-1.91"},"shipping_amount":{"currency_code":"USD","value":"11.70"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1431.43"},"available_balance":{"currency_code":"USD","value":"1431.43"},"invoice_id":"151928599","custom_field":"[%eci151928599|1b46612164eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"FMFD96G4QKZGJ","email_address":"cpharbaugh@aol.com","address_status":"Y","payer_status":"Y","payer_name":{"given_name":"Christopher","surname":"Harbaugh","alternate_full_name":"Christopher Harbaugh"},"country_code":"US"},"shipping_info":{"name":"Christopher R Harbaugh","address":{"line1":"5212 Lonsdale Dr","city":"Springfield","state":"VA","country_code":"US","postal_code":"22151-1711"}},"cart_info":{"item_details":[{"item_code":"1739777","item_name":"Our Gaze CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"11.00"},"item_amount":{"currency_code":"USD","value":"11.00"},"total_item_amount":{"currency_code":"USD","value":"11.00"},"invoice_number":"151928599"},{"item_code":"1739776","item_name":"Our Gaze LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"18.00"},"item_amount":{"currency_code":"USD","value":"18.00"},"total_item_amount":{"currency_code":"USD","value":"18.00"},"invoice_number":"151928599"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"KXCM8UVFJ8KKQ","transaction_id":"8UY77864RU281035L","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-07T01:43:13+0000","transaction_updated_date":"2022-04-07T01:43:13+0000","transaction_amount":{"currency_code":"USD","value":"72.40"},"fee_amount":{"currency_code":"USD","value":"-3.02"},"shipping_amount":{"currency_code":"USD","value":"12.40"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1500.81"},"available_balance":{"currency_code":"USD","value":"1500.81"},"invoice_id":"151942918","custom_field":"[%eci151942918|03fb37c59beci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"KXCM8UVFJ8KKQ","email_address":"robert.hickam@gmail.com","address_status":"Y","payer_status":"N","payer_name":{"given_name":"Robert","surname":"HickamSmith","alternate_full_name":"Robert HickamSmith"},"country_code":"US"},"shipping_info":{"name":"Robert Hickam-Smith","address":{"line1":"5634 Hampton Street","city":"Pittsburgh","state":"PA","country_code":"US","postal_code":"15206"}},"cart_info":{"item_details":[{"item_code":"1248391","item_name":"Honey Locust Honky Tonk LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"16.00"},"item_amount":{"currency_code":"USD","value":"16.00"},"total_item_amount":{"currency_code":"USD","value":"16.00"},"invoice_number":"151942918"},{"item_code":"1727086","item_name":"From a Compound Eye LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"26.00"},"item_amount":{"currency_code":"USD","value":"26.00"},"total_item_amount":{"currency_code":"USD","value":"26.00"},"invoice_number":"151942918"},{"item_code":"1609226","item_name":"Kid Marine LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"18.00"},"item_amount":{"currency_code":"USD","value":"18.00"},"total_item_amount":{"currency_code":"USD","value":"18.00"},"invoice_number":"151942918"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"UB3PE7E5PZTMA","transaction_id":"8CK10841XR6339209","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-07T12:22:18+0000","transaction_updated_date":"2022-04-07T12:22:18+0000","transaction_amount":{"currency_code":"USD","value":"62.40"},"fee_amount":{"currency_code":"USD","value":"-2.67"},"shipping_amount":{"currency_code":"USD","value":"12.40"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1560.54"},"available_balance":{"currency_code":"USD","value":"1560.54"},"invoice_id":"151965362","custom_field":"[%eci151965362|aff0f7e5c0eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"UB3PE7E5PZTMA","email_address":"bertling.david@gmail.com","address_status":"Y","payer_status":"Y","payer_name":{"given_name":"david","surname":"bertling","alternate_full_name":"david bertling"},"country_code":"US"},"shipping_info":{"name":"David Bertling","address":{"line1":"8300 Sawyer Brown Rd.","line2":"G305","city":"Nashville","state":"TN","country_code":"US","postal_code":"37221"}},"cart_info":{"item_details":[{"item_code":"1660577","item_name":"Eat 16","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"22.00"},"item_amount":{"currency_code":"USD","value":"22.00"},"total_item_amount":{"currency_code":"USD","value":"22.00"},"invoice_number":"151965362"},{"item_code":"1339515","item_name":"Eat 10","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"10.00"},"item_amount":{"currency_code":"USD","value":"10.00"},"total_item_amount":{"currency_code":"USD","value":"10.00"},"invoice_number":"151965362"},{"item_code":"259915","item_name":"EAT 2","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"8.00"},"item_amount":{"currency_code":"USD","value":"8.00"},"total_item_amount":{"currency_code":"USD","value":"8.00"},"invoice_number":"151965362"},{"item_code":"1578588","item_name":"Eat 14","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"10.00"},"item_amount":{"currency_code":"USD","value":"10.00"},"total_item_amount":{"currency_code":"USD","value":"10.00"},"invoice_number":"151965362"}]},"store_info":{},"auction_info":{},"incentive_info":{}},{"transaction_info":{"paypal_account_id":"7VYEVS2NG2DK6","transaction_id":"6F921573F2571662X","transaction_event_code":"T0007","transaction_initiation_date":"2022-04-07T14:15:41+0000","transaction_updated_date":"2022-04-07T14:15:41+0000","transaction_amount":{"currency_code":"USD","value":"73.90"},"fee_amount":{"currency_code":"USD","value":"-3.07"},"shipping_amount":{"currency_code":"USD","value":"18.90"},"transaction_status":"S","ending_balance":{"currency_code":"USD","value":"1631.37"},"available_balance":{"currency_code":"USD","value":"1631.37"},"invoice_id":"151969465","custom_field":"[%eci151969465|46f7879565eci%]","protection_eligibility":"01","instrument_type":"PAYPAL"},"payer_info":{"account_id":"7VYEVS2NG2DK6","email_address":"snailpoison@gmail.com","address_status":"Y","payer_status":"Y","payer_name":{"given_name":"William","surname":"Eckert","alternate_full_name":"William Eckert"},"country_code":"US"},"shipping_info":{"name":"William Eckert","address":{"line1":"1295 N. Pinecrest Canyon Road","city":"Salt Lake City","state":"UT","country_code":"US","postal_code":"84108"}},"cart_info":{"item_details":[{"item_code":"1739776","item_name":"Our Gaze LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"18.00"},"item_amount":{"currency_code":"USD","value":"18.00"},"total_item_amount":{"currency_code":"USD","value":"18.00"},"invoice_number":"151969465"},{"item_code":"784495","item_name":"Our Cubehouse Still Rocks CD","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"5.00"},"item_amount":{"currency_code":"USD","value":"5.00"},"total_item_amount":{"currency_code":"USD","value":"5.00"},"invoice_number":"151969465"},{"item_code":"270239","item_name":"Turn To Red LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"16.00"},"item_amount":{"currency_code":"USD","value":"16.00"},"total_item_amount":{"currency_code":"USD","value":"16.00"},"invoice_number":"151969465"},{"item_code":"270229","item_name":"Lightninghead To Coffee Pot LP","item_quantity":"1","item_unit_price":{"currency_code":"USD","value":"16.00"},"item_amount":{"currency_code":"USD","value":"16.00"},"total_item_amount":{"currency_code":"USD","value":"16.00"},"invoice_number":"151969465"}]},"store_info":{},"auction_info":{},"incentive_info":{}}],"account_number":"4S6F684N5Q7QG","start_date":"2022-04-05T05:00:00+0000","end_date":"2022-04-07T14:29:59+0000","last_refreshed_datetime":"2022-04-07T14:29:59+0000","page":1,"total_items":9,"total_pages":1,"links":[{"href":"https://api.paypal.com/v1/reporting/transactions?end_date=2022-04-17T23%3A59%3A59-0500&fields=all&start_date=2022-04-05T00%3A00%3A00-0500&page_size=100&page=1","rel":"self","method":"GET"}]}