C3Grid on an array

#1

I am trying to run this command: c3Grid(CanonicalAccount.fieldTypes()) to visualize the content of the array. It shows an empty screen.
How can I see the contents in a grid?

0 Likes

#2

You will need to add the field types collection to a parent variable. For example:

var container = {};
var fieldTypes = CanonicalAccount.fieldTypes();
container.fields = fieldTypes
c3Grid(container);

1 Like

#3

Even in a shorter version:
c3Grid({data:CanonicalAccount.fieldTypes()})

0 Likes