Write a function in JavaScript

Job ID: 35608971

Budget: $10 – $100 USD

I want function in JavaScript
receive:
1- JSON swagger file as string
2- endPoint name

getRequestBodyAndResponseBody(json, endPointName){}

return :
1- request body “ like in the picture 2“
2- Response “200” body “ like in the picture 3 “

For the endPint “ like in the picture 1 “
Related categories: JavaScript HTML5 jQuery / Prototype Typescript jQuery