updated complex object to JS