# Replace header with data from different query

**URL:** <https://community.grafana.com/t/replace-header-with-data-from-different-query/73142>\
**Category:** Configuration\
**Tags:** transformations\
**Created:** [September 27, 2022, 7:57pm UTC](https://community.grafana.com/t/replace-header-with-data-from-different-query/73142 "2022-09-27T19:57:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harterhorst](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@harterhorst](https://community.grafana.com/u/harterhorst)\
**Post date:** [September 27, 2022, 7:57pm UTC](https://community.grafana.com/t/replace-header-with-data-from-different-query/73142/1 "2022-09-27T19:57:29Z")

</div>

- What Grafana version and what operating system are you using?

Docker Image - v 9.1.6 with json api 1.3.1 from Marcus Olsson

- **What** are you trying to achieve?

I have two separate JSON REST queries. A and B. A sets up a table with headers. Table B has names I’d like to use as headers in table A. The order of B is aligned with the headers of table A.

- **How** are you trying to achieve it?

Use transform functions to replace headers in table A.

**Table A:**

```auto
Date Count 0 1 2 3
xxx 9 1 2 5 1 
xxx 19 2 7 4 6

```

**Table B:**

Host A  
Host B  
Host C  
Host D  
…  
**Expected result**

```auto
Date Count Host A Host B Host C Host D
xxx 9 1 2 5 1
xxx 19 2 7 4 6

```
