title: How to read arbitrary object from arangodb using cursor.ReadDocument()
body: <p>I am trying to build a fairly generalizable service to create graphs in <code>arangodb</code>.</p>
  
  <p>In my <code>ReadVertex()</code> function, I would like to be able to read a property with arbitrary fields of a vertex and read it into a variable, preferably a string without having to create a specific struct with the json tags hardcoded for particular properties.</p>
  
  <p>I have no problem inserting arbitrary objects as a property of a vertex, and I've tried reading them into a string, but it always comes up blank.</p>
  
  <p>An example of what I would like to accomplish: if a vertex has a property: <code>"Prop1": {"Nested1": true, "Nested2": false}</code>, and a property <code>"Prop2": "Just a string"</code>, in my <code>ReadVertex()</code> function I would like to be able to do something along the lines of</p>
  
  <pre><code>// query the database and get a cursor containing prop1 and prop2
  
  var prop1 someType
  cursor.ReadDocument(ctx, &amp;prop1)
  fmt.Println(prop1.String()) // should print {"Prop1": {"Nested1": true, "Nested2": false}}
  
  var prop2 someType
  cursor.ReadDocument(ctx, &amp;prop2)
  fmt.Println(prop2.String()) // should print {"Prop2": "Just a string"}
  </code></pre>
  
  <p>And I would like this to work having prop1 and prop2 be of the same type.</p>