@Sanket1
It will utilize a loop, but this will yield super faster results compared to PAD actions.
You can substitute 'Jsonstring' with your JSON variable, and the 'search variable' can be replaced with your PAD variable.

Below is the full PAD code(Not powershell code):
@@copilotGeneratedAction: 'False'
Scripting.RunPowershellScript.RunPowershellScript Script: $'''function ValueExistsInJson {
param (
[string]$jsonString,
[string]$valueToCheck
)
$jsonObject = $jsonString | ConvertFrom-Json
# Flatten the JSON object into a list of values
$allValues = $jsonObject | ForEach-Object -Process {
$_.psobject.Properties.Value
}
# Check if the specific value exists in the list of values
return $allValues -contains $valueToCheck
}
# Example usage
$jsonString = \'[
{\"id\": 1, \"name\": \"John\"},
{\"id\": 2, \"name\": \"Doe\"},
{\"id\": 3, \"name\": \"Jane\"}
]\'
$valueToCheck = \"Deenu\"
$result = ValueExistsInJson -jsonString $jsonString -valueToCheck $valueToCheck
Write-Output $result # Output will be True or False
''' ScriptOutput=> PowershellOutput
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀