---
title: Map Keys By Index
slug: map-keys-by-index
docTags: 
createdAt: 2021-12-22T07:28:32.000Z
---

Maps keys of a given list to a specified order in the given map. Define and empty string to omit a key in the output

e.g. "first\_key","second\_key",**""**,"third\_key"



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/list/map_keys_by_pos",
  "name": "Merge Two JSON Object List on Key API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": [\n        {\n            \"owner\": \"Bruce\",\n            \"enterprise\": \"Wayne Enterprises\",\n            \"location\": \"Gotham\"\n        },\n        {\n            \"owner\": \"Clark\",\n            \"enterprise\": \"n/a\",\n            \"location\": \"Smallville\"\n        }\n    ],\n    \"size_in_bytes\": 311.0\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\n    \"input\": [\n        {\n            \"name\": \"Bruce\",\n            \"company\": \"Wayne Enterprises\",\n            \"villains\": \"joker\",\n            \"city\": \"Gotham\"\n        },\n        {\n            \"name\": \"Clark\",\n            \"company\": \"n/a\",\n            \"villains\": \"zod\",\n            \"city\": \"Smallville\"\n        }\n    ],\n    \"map\": [\n        \"owner\",\n        \"enterprise\",\n        \"\",\n        \"location\"\n    ]\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::















