create elements from JSON objects