sed is clumsy, but here is what I could get -
sed 's/.*\(Apple\)[^:]*:"\([0-9]*\)".*/Enter product ID: \1\nYour product ID is: \2/' 3
Enter product ID: Apple
Your product ID is: 2134
sed 's/.*\(Mango\)[^:]*:"\([0-9]*\)".*/Enter product ID: \1\nYour product ID is: \2/' 3
Enter product ID: Mango
Your product ID is: 4567
Edited based on latest input which is slightly different
./prod.sed Apple
Enter product ID: Apple
Your product ID is: 1234
./prod.sed Mango
Enter product ID: Mango
Your product ID is: 12345
prod.sed
#sed 's/.*product_id":"\(Apple\).*"productBuildId":"\([0-9]*\)".*/Enter product ID: \1\nYour product ID is: \2/' data
sed 's/.*product_id":"\('"$1"'\).*"productBuildId":"\([0-9]*\)".*/Enter product ID: \1\nYour product ID is: \2/' data
explanation : substitute the string <anything> Mango <anything other than :> : <number> with -> Your product ID is: Mango <next line>
Your product ID is : <the number we got>
\1 and \2 save the matched expression in \(..\) for later use.