Dear All,
Small trick works to get expected result. attached final script image herewith for reference. Refer red encircled node.
Thank you.