I'm trying to execute the below request payload (JSON) and getting the response back as below:
CURL command:
curl --header "Content-Type: application/json" --header "hostname:kindle.qa.amazon.com" \
--request POST \
--data '{
"country":"BE",
"cardNumberPayment":"9423-8234-1882-3412",
"cardType" : "Visa",
"expirationMonth": "12",
"expirationYear": "2020"
}' \
http://amazon.qa.payment.com/v1/Services/restservices/credit
Response:
{"cardType":"Visa","cardNumber":"9423823418823409","cvv":"***"}
{"cardType":"Visa","cardNumber":"9423823418823411","cvv":"***"}
{"cardType":"Visa","cardNumber":"9423823418823410","cvv":"***"}
I just want to get cardNumber for the curl command instead of printing the entire JSON (Except cardType, and cvv).
Expected Output:
9423823418823409
9423823418823411
9423823418823410
I just want to get the list of card numbers alone to print as output. How can I achieve this?