fix templating for value storage
add a method that handles creating the json for value assignment for relations