restruct js