Modify js to dynamic result