---
title: "Proper Mapping for dynamic fields"  
description: "Proper Mapping for dynamic fields"  
author: "Hank Greenberg"  
published: 2013-07-08  
updated: 2013-07-08  
canonical: https://www.mindstick.com/forum/1263/proper-mapping-for-dynamic-fields  
category: "json"  
tags: ["json"]  
reading_time: 1 minute  

---

# Proper Mapping for dynamic fields

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances)!\
I have the following [document](https://www.mindstick.com/articles/328642/what-to-consider-while-choosing-a-software-documentation-tool) [structure](https://www.mindstick.com/articles/23258/choose-your-business-structure-wisely):\
**{** **"some_field": "some_data",** **"entries": {** **{"id": "some_id", "type": "some_type", "[value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages)": "some_value"},** **{"id": "another_id", "type": "another_type", "value": {"foo": 1, "bar": "two"}** **}****}**\
So I would like to [map](https://yourviews.mindstick.com/view/81351/nepal-parliament-s-approves-new-controversial-map-india-rejects-it-but) entries based on the "type" field. Which [mapping](https://www.mindstick.com/forum/34816/what-is-mapping-constraints-in-database-management-system) type or [flag](https://answers.mindstick.com/qa/34828/how-many-stars-were-on-the-original-american-flag) should I use? Or maybe I need to change my doc structure?\

## Replies

### Reply by AVADHESH PATEL

Hi Hank!\
I think you should use array with "'[' ']'" you can check your json using this website\
{ "some_field":"some_data", "entries":[{ "id":"some_id", "type":"some_type", "value":"some_value" }, { "id":"another_id", "type":"another_type", "value":{ "foo":1, "bar":"two" } }]}


---

Original Source: https://www.mindstick.com/forum/1263/proper-mapping-for-dynamic-fields

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
