conditional json spread operator

Solutions on MaxInterview for conditional json spread operator by the best coders in the world