we need to filter list view items based on some conditions for which we need current context(sp.ClientContext). but we are getting undefined or null reference. we have also followed the solution provided by Vadim Gremyachev on Stack exchange
but as soon as the sp.js loads; list view also gets load. so whatever condition we want to apply to filter out list view items does not work as the required code starts working after list view loads.
Please suggest how we can solve this problem.