Linux expert needed with jq/sed command

Job ID: 33731837

Budget: ₹750 – ₹1,250 INR

Hi,

I am adding json objects through Jenkins parameters in a json file in SE bucket, then first ones will be added through Jenkins parameter once the build has completed.

When we run the build for second time, it will replace the last four values added in text file and then also add a new object in json.

Let me know if you can write a command to replace the last four values of last object in json file.

defaultAvailableOS is empty json in S3.
sampleUpdate-OS is how the output is expected.

FP1 stands for Fingerprint1. If FP2 is added then, inside the FP1 object, all values should be replaced of FP1 with FP2.