René's URL Explorer Experiment


Title: continue to deal the result as a array after filter · Issue #202 · JSONPath-Plus/JSONPath · GitHub

Open Graph Title: continue to deal the result as a array after filter · Issue #202 · JSONPath-Plus/JSONPath

X Title: continue to deal the result as a array after filter · Issue #202 · JSONPath-Plus/JSONPath

Description: Motivation I have a json like this: { "contactMedium": [ { "@type": "EmailContactMedium", "preferred": true, "contactType": "other", "validFor": { "startDateTime": "2018-10-22T08:31:52.028Z" }, "emailAddress": "tom@email.com" }, { "@type...

Open Graph Description: Motivation I have a json like this: { "contactMedium": [ { "@type": "EmailContactMedium", "preferred": true, "contactType": "other", "validFor": { "startDateTime": "2018-10-22T08:31:52.028Z" }, "em...

X Description: Motivation I have a json like this: { "contactMedium": [ { "@type": "EmailContactMedium", "preferred": true, "contactType": "other", &quo...

Opengraph URL: https://github.com/JSONPath-Plus/JSONPath/issues/202

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"continue to deal the result as a array after filter","articleBody":"## Motivation\r\nI have a json like this:\r\n```\r\n{\r\n  \"contactMedium\": [\r\n    {\r\n      \"@type\": \"EmailContactMedium\",\r\n      \"preferred\": true,\r\n      \"contactType\": \"other\",\r\n      \"validFor\": {\r\n        \"startDateTime\": \"2018-10-22T08:31:52.028Z\"\r\n      },\r\n      \"emailAddress\": \"tom@email.com\"\r\n    },\r\n    {\r\n      \"@type\": \"GeographicAddressContactMedium\",\r\n      \"preferred\": true,\r\n      \"contactType\": \"other\",\r\n      \"validFor\": {\r\n        \"startDateTime\": \"2018-10-22T08:31:52.028Z\"\r\n      },\r\n    }\r\n  ]\r\n}\r\n```\r\nI want to get the number of item with preferred==true\r\nconst result = JSONPath({ path: '$.contactMedium[?(@.preferred==true)].length', json: data })\r\n## Current behavior\r\ngot []\r\n## Desired behavior\r\ngot 2\r\n## Alternatives considered\r\ncurrently, i can got the result expected by this way.\r\nconst result = JSONPath({ path: '$.contactMedium[?(@.preferred==true)]', json: data })\r\nconsole.log(result)\r\n\r\nconst result2 = JSONPath({ path: '$.length', json: result })\r\nconsole.log(result2)","author":{"url":"https://github.com/NingGelin","@type":"Person","name":"NingGelin"},"datePublished":"2024-01-15T06:05:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/202/JSONPath/issues/202"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f2831b68-6b0a-2548-fdf2-c46359427305
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8A24:FDA3:26D48F7:33C8279:696EFDDD
html-safe-noncee339b26eb71534b58d55f7d35994e1b2bb7fb040497a993ef08d7e66434890b1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTI0OkZEQTM6MjZENDhGNzozM0M4Mjc5OjY5NkVGREREIiwidmlzaXRvcl9pZCI6IjgzMzEzMDAzOTc5MDczMDcxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd7af59de5b47eaf29af700bce601019d32770abb8d9c75c5fa23feaf5464b92c
hovercard-subject-tagissue:2081312412
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONPath-Plus/JSONPath/202/issue_layout
twitter:imagehttps://opengraph.githubassets.com/49c5e759a6b9a99b624b89853e27b7ac3660a0b5f0eaee3996cb7c00029881ec/JSONPath-Plus/JSONPath/issues/202
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/49c5e759a6b9a99b624b89853e27b7ac3660a0b5f0eaee3996cb7c00029881ec/JSONPath-Plus/JSONPath/issues/202
og:image:altMotivation I have a json like this: { "contactMedium": [ { "@type": "EmailContactMedium", "preferred": true, "contactType": "other", "validFor": { "startDateTime": "2018-10-22T08:31:52.028Z" }, "em...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameNingGelin
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/JSONPath-Plus/JSONPath git https://github.com/JSONPath-Plus/JSONPath.git
octolytics-dimension-user_id67874603
octolytics-dimension-user_loginJSONPath-Plus
octolytics-dimension-repository_id1716525
octolytics-dimension-repository_nwoJSONPath-Plus/JSONPath
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1716525
octolytics-dimension-repository_network_root_nwoJSONPath-Plus/JSONPath
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONPath-Plus%2FJSONPath%2Fissues%2F202
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONPath-Plus%2FJSONPath%2Fissues%2F202
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONPath-Plus%2FJSONPath
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202
JSONPath-Plus https://patch-diff.githubusercontent.com/JSONPath-Plus
JSONPathhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Please reload this pagehttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Fork 198 https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Star 1.1k https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Code https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Issues 49 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues
Pull requests 5 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulls
Actions https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/actions
Projects 0 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/projects
Wiki https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/security
Please reload this pagehttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202
Insights https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulse
Code https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Issues https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues
Pull requests https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulls
Actions https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/actions
Projects https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/projects
Wiki https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/wiki
Security https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/security
Insights https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JSONPath-Plus/JSONPath/issues/202
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JSONPath-Plus/JSONPath/issues/202
continue to deal the result as a array after filterhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/202#top
Featurehttps://github.com/JSONPath-Plus/JSONPath/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com/NingGelin
https://github.com/NingGelin
NingGelinhttps://github.com/NingGelin
on Jan 15, 2024https://github.com/JSONPath-Plus/JSONPath/issues/202#issue-2081312412
Featurehttps://github.com/JSONPath-Plus/JSONPath/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.