Please note this solution is not reliable! I have used it and it will not return all subitem ids for some parent items!!