API response validation based on request value

i have learned that using the snippets to validate the response value, but this is not good to my test cases. because it is getting the value from response and validate it. assuming the response value is known.

in my case, i wanted to validate what had been sent is exactly response after request sent.
how can i script it?
POST message JSON
“name”: “test one”,

then response verification , the value is = “name”: “test one”. i do not know what to be written at the xxxxx. anyone could guide me? or instead of doing this inside object, can i have some codes in the test case script instead?