# Dynamic object under a type

**URL:** <https://discuss.dgraph.io/t/dynamic-object-under-a-type/11235>\
**Category:** Dgraph\
**Tags:** kind:question, dgraph, area:graphql\
**Created:** [November 1, 2020, 9:45am UTC](https://discuss.dgraph.io/t/dynamic-object-under-a-type/11235 "2020-11-01T09:45:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinelsun](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/spinelsun/32/4596_2.png) [@spinelsun](https://discuss.dgraph.io/u/spinelsun)\
**Post date:** [November 1, 2020, 9:45am UTC](https://discuss.dgraph.io/t/dynamic-object-under-a-type/11235/1 "2020-11-01T09:45:37Z")

</div>

Hi,

I have a type in my scheme that I want to expand with some metadata, which is dynamic.  
The user enters whatever metadata he wants.  
What I want to have in my type is a field that has a dictionary(JSON object) as a value.  
Does DGraph any support for this? If not can you suggest a solution?

Thanks,  
Spinelsun

---

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [November 1, 2020, 1:32pm UTC](https://discuss.dgraph.io/t/dynamic-object-under-a-type/11235/2 "2020-11-01T13:32:01Z")

</div>

Stringify the JSON and store it as a string.

---

<div class="post-metadata">

**Author:** ![chewxy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/chewxy/32/4339_2.png) [@chewxy](https://discuss.dgraph.io/u/chewxy)\
**Post date:** [November 2, 2020, 3:37am UTC](https://discuss.dgraph.io/t/dynamic-object-under-a-type/11235/3 "2020-11-02T03:37:53Z")

</div>

Related feature request:

> [@JSON (blob) as a scalar](http://discuss.hypermode.com/t/json-blob-as-a-scalar/11034/):
>
> It would be nice to have a new built in scalar called JSON. Yes, while we could currently store the string representation in a String, having a JSON typed scalar, even though the underlying representation is exactly the same (i.e. still a string), it’d be more “type safe”\*. The difference is when deserializing the response: simply replace the quoted json with the representation. How It Works (Example) Given a schema as follows: type Foo { name: String! @id bar: JSON } Assume we have …
