Fixes #5786: You cannot pass 'include' /  'exclude' targets as json for ...

I also renamed the method extractJsonList to extractJsonListString to make more apparent that IT DOES NOT HANDLE JSON VALUE OTHER THAN STRING
The name of the function is not correct and should be 'mergeTarget' not not mergetTarget :)