adding only visible nodes during tree building
generating query for node based on jsonnode's path