Convert javascript to metadata