Question

mapping json attribute header

  • 30 January 2019
  • 1 reply
  • 6 views

Badge

I'm trying to map the header from my json so i dont have to manually paste them into the json extractor. So far i have two https callers one for the response body and the other for metadata. I create a list from the metadata for the header. This works fine! I next use attributeexposer but it just adds the list as an attribute. How do i get the list to become the header?


1 reply

Userlevel 2
Badge +17

Hi @brianapeters,

You can use the JSONTemplater to create the JSON header from your list. When you add double-click on the list to add it into the JSON, you will be asked which element of the list to use, or you can add the desired element index between the {} after adding it.

You can also add the response body after the header in the same JSONTemplater, using the get-json-attribute XQuery.

Please see this documentation for more detailed information, or this article for a tutorial on the JSONTemplater.

Reply