[ad_1]
I am trying to access JSON values of neo4j graph from GraSS file to set styling. This is color property present under relationship->properties in JSON returned from neo4j graph. Please help.
Below is JSON from a single relationship between two nodes. First node is “xinhua” and second node is “united states”
Sample JSON from a relationship
{
"start": {
"identity": 9687,
"labels": [
"Organisation",
"DARK_RED"
],
"properties": {
"id": "xinhua",
"esg_index": -0.38899460084298076
}
},
"end": {
"identity": 13155,
"labels": [
"Organisation",
"DARK_RED"
],
"properties": {
"id": "united states",
"esg_index": -1.7502826670133467
}
},
"segments": [
{
"start": {
"identity": 9687,
"labels": [
"Organisation",
"DARK_RED"
],
"properties": {
"id": "xinhua",
"esg_index": -0.38899460084298076
}
},
"relationship": {
"identity": 0,
"start": 9687,
"end": 13155,
"type": "RELATE",
"properties": {
"sentiment": -2.9477125713902135,
"color": "DARK_RED",
"freq": 775
}
},
"end": {
"identity": 13155,
"labels": [
"Organisation",
"DARK_RED"
],
"properties": {
"id": "united states",
"esg_index": -1.7502826670133467
}
}
}
],
"length": 1.0
}
Grass file contents
node {
diameter: 50px;
color: #A5ABB6;
border-color: #9AA1AC;
border-width: 2px;
text-color-internal: #FFFFFF;
font-size: 10px;
caption: "<id>";
}
relationship {
color: #A5ABB6;
shaft-width: 1px;
font-size: 8px;
padding: 3px;
text-color-external: #000000;
text-color-internal: #FFFFFF;
caption: "<type>";
}
node.Movie {
color: #C990C0;
border-color: #b261a5;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
caption: "{title}";
}
node.Person {
color: #F79767;
border-color: #f36924;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
caption: "{name}";
}
node.Entity {
color: #57C7E3;
border-color: #23b3d7;
text-color-internal: #2A2C34;
caption: "{wikipedia_name}";
}
node.Organisation {
color: #F16667;
border-color: #eb2728;
text-color-internal: #FFFFFF;
caption: "{id}";
}
node.JohnsHopkinsUniversity {
color: #D9C8AE;
border-color: #c0a378;
text-color-internal: #2A2C34;
defaultCaption: "<id>";
caption: "{esg_index}";
}
node.AssociationOfSoutheastAsianNations {
color: #8DCC93;
border-color: #5db665;
text-color-internal: #2A2C34;
defaultCaption: "<id>";
caption: "{id}";
}
node.CentersForDiseaseControl {
color: #ECB5C9;
border-color: #da7298;
text-color-internal: #2A2C34;
defaultCaption: "<id>";
}
node.AtlanticInstitution {
color: #4C8EDA;
border-color: #2870c2;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
}
node.WallisAnnenbergCenter {
color: #FFC454;
border-color: #d7a013;
text-color-internal: #2A2C34;
defaultCaption: "<id>";
caption: "{esg_index}";
}
node.IslandHousing {
color: #DA7194;
border-color: #cc3c6c;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
}
node.MullingarDistrictCourt {
color: #569480;
border-color: #447666;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
caption: "{esg_index}";
}
node.KhaamaPressNewsAgency {
defaultCaption: "<id>";
}
node.MelitaHealthCentre {
defaultCaption: "<id>";
}
node.ArgusSantaFund {
defaultCaption: "<id>";
}
node.KennedySpaceCenter {
defaultCaption: "<id>";
}
node.KentuckyBloodCenter {
defaultCaption: "<id>";
}
node.PoliceScotland {
defaultCaption: "<id>";
}
node.SamidounPalestinianPrisonerSolidarityNetwork {
defaultCaption: "<id>";
}
node.CongressionalManagementFoundation {
defaultCaption: "<id>";
}
node.SchoolTalvali {
defaultCaption: "<id>";
}
node.BellaVistaLutheranChurch {
defaultCaption: "<id>";
}
node.BaylorCollegeOfMedicine {
defaultCaption: "<id>";
}
node.UniversityOfSeville {
defaultCaption: "<id>";
}
node.CongressCorporatorPrafulGudadhe {
defaultCaption: "<id>";
}
node.ShareIndexOfTheNigerianExchange {
defaultCaption: "<id>";
caption: "{esg_index}";
}
node.PhilippinesAirline {
defaultCaption: "<id>";
}
node.BharatChamber {
defaultCaption: "<id>";
}
node.HouseNewsService {
defaultCaption: "<id>";
}
node.AwamiLeaguePresidiumMemberShajahanKhan {
defaultCaption: "<id>";
}
node.IslandPublicSchoolsFoundation {
defaultCaption: "<id>";
}
node.UniversityOfBristol {
defaultCaption: "<id>";
}
node.ClubOfArlingtonHeights {
defaultCaption: "<id>";
}
node.RiHealthDept {
defaultCaption: "<id>";
}
node.OakOrchardHealthInHornell {
defaultCaption: "<id>";
}
node.SmithboroughPresbyterianChurch {
defaultCaption: "<id>";
}
node.LomonosovStateUniversity {
defaultCaption: "<id>";
}
node.OranaFoundation {
defaultCaption: "<id>";
}
node.PublicAffairsResearchCouncil {
defaultCaption: "<id>";
}
node.TsodiloResourcesLimited {
defaultCaption: "<id>";
}
node.LandAllocationLtd {
defaultCaption: "<id>";
}
node.CalgaryCatholicSchoolDistrict {
defaultCaption: "<id>";
}
node.UniversityOfAlabamaSchoolOfLaw {
defaultCaption: "<id>";
}
node.NationalTalentCompetition {
defaultCaption: "<id>";
}
node.SpaceForgeLtd {
defaultCaption: "<id>";
}
node.BritishSocietyForImmunology {
defaultCaption: "<id>";
}
node.TenantUnion {
defaultCaption: "<id>";
}
node.UnitedPresbyterianChurch {
defaultCaption: "<id>";
}
node.GlobalDevelopmentInitiative {
defaultCaption: "<id>";
}
node.GreaterEglestonCommunityHighSchool {
defaultCaption: "<id>";
}
node.LasCrucesPolice {
defaultCaption: "<id>";
}
node.USHighwayAdministration {
defaultCaption: "<id>";
}
node.RioRanchoCyberAcademy {
defaultCaption: "<id>";
}
node.Citigroup {
defaultCaption: "<id>";
}
node.ZacksInvestmentResearch {
defaultCaption: "<id>";
}
node.SecuritiesExchangeCommission {
defaultCaption: "<id>";
}
node.MorganStanley {
defaultCaption: "<id>";
caption: "{id}";
}
node.ExchangeCommission {
defaultCaption: "<id>";
}
node.RoyalBank {
defaultCaption: "<id>";
}
node.ShellAssetManagementCo {
defaultCaption: "<id>";
}
node.JefferiesFinancialGroup {
defaultCaption: "<id>";
}
node.UnitedStates {
defaultCaption: "<id>";
}
node.WhiteHouse {
defaultCaption: "<id>";
}
node.Instagram {
defaultCaption: "<id>";
}
node.HowTheSupremeCourt {
defaultCaption: "<id>";
}
node.Microsoft {
defaultCaption: "<id>";
}
node.AlaskaAirlines {
defaultCaption: "<id>";
}
node.ChinaNationalNuclearCorp {
defaultCaption: "<id>";
}
node.OakhurstPresbyterianChurch {
defaultCaption: "<id>";
}
node.USArmy {
defaultCaption: "<id>";
}
node.Nasdaq {
defaultCaption: "<id>";
}
node.DepartmentOfTourism {
defaultCaption: "<id>";
}
node.UnInternationalOrganizationForMigration {
defaultCaption: "<id>";
}
node.NationalHealthService {
defaultCaption: "<id>";
}
node.Cnn {
defaultCaption: "<id>";
}
node.ColdWarAtDukeUniversity {
defaultCaption: "<id>";
}
node.Twitter {
defaultCaption: "<id>";
}
node.GovernmentAccountabilityOffice {
defaultCaption: "<id>";
}
node.DepartmentOfJustice {
defaultCaption: "<id>";
}
node.UniversityOfCambridge {
defaultCaption: "<id>";
}
node.VentureExchange {
defaultCaption: "<id>";
}
node.WarnermediaCompany {
defaultCaption: "<id>";
}
node.CityCouncil {
defaultCaption: "<id>";
}
node.Netflix {
defaultCaption: "<id>";
}
node.DepartmentOfHomelandSecurity {
defaultCaption: "<id>";
}
node.HarvardUniversity {
defaultCaption: "<id>";
}
node.ForeignMinistry {
defaultCaption: "<id>";
}
node.Commutair {
defaultCaption: "<id>";
}
node.DemocraticParty {
defaultCaption: "<id>";
}
node.OxfordUniversity {
defaultCaption: "<id>";
}
node.SouthwestAirlines {
defaultCaption: "<id>";
}
node.USAir {
defaultCaption: "<id>";
}
node.AfricanNationalCongress {
defaultCaption: "<id>";
}
node.UniversityOfHongKong {
defaultCaption: "<id>";
}
node.RegulationServicesProvider {
defaultCaption: "<id>";
}
node.OregonHealthAuthority {
defaultCaption: "<id>";
}
node.UniversityOfMichigan {
defaultCaption: "<id>";
}
node.Verizon {
defaultCaption: "<id>";
}
node.Toyota {
defaultCaption: "<id>";
}
node.NewYorkPost {
defaultCaption: "<id>";
}
node.AFundForWomen {
defaultCaption: "<id>";
caption: "{esg_index}";
}
node.AcreFund {
defaultCaption: "<id>";
}
node.AayogExpertCommittee {
defaultCaption: "<id>";
}
node.DARK_RED {
defaultCaption: "<id>";
}
node.GREEN {
defaultCaption: "<id>";
color: #8DCC93;
border-color: #5db665;
text-color-internal: #2A2C34;
}
relationship.RELATE {
caption: "<type>";
}
[ad_2]