-
python concat auto insert backslash i can't remove
I have a problem with my python concat, as you see the value of "item" holds the right value, but when i add it to a string, it inserts backslashes. I have tried with replace, rstrip and strip. Non of them worked.I don't know if I am missing something, hope you can help.
a prints:
`'"name": "[parameters(\'dynamicsax_1_Connection_Name\')]"'`
item prints:
`'dynamicsax_1_Connection_Name'
`Code:
`entries = Path("C:\\Users\\Aske.Meyer\\D365 Integration\\ERPD365AzureResources\\LogicApps")
my_list_of_param = ['dynamicsax_1_Connection_Name', 'dynamicsax_2_Connection_Name','dynamicsax_3_Connection_Name',
'servicebus_2_Connection_Name','servicebus_3_Connection_Name','servicebus_3_Connection_DisplayName',
'servicebus_4_Connection_Name', 'servicebus_6_Connection_Name', 'servicebus_6_Connection_DisplayName',
'documentdb_1_Connection_Name', 'documentdb_1_Connection_DisplayName', 'documentdb_1_databaseAccount']
empty_list= []
found_params = []
not_found_params = []
for entry in entries.iterdir():
with open(entry) as file:
print(file.name)
content = json.load(file) #exclude param files
parameter = content['parameters']
for item in my_list_of_param:
param_name = "\"name\": \"[parameters(\'"+item+"\')]\""
a = param_name.replace("\\", "")
print(a)
print(item)`
Log In to reply.
Popular Salesforce Blogs
Finding the Best Salesforce Consulting Partner: Your Guide to Success
In today's competitive business landscape, organizations across industries are leveraging the power of Salesforce to streamline operations, enhance customer relationships, and drive growth. However, maximizing…
The Top Reasons to Invest in Salesforce Professional Services
In today's business world, technology is a big deal, and when it comes to making things work better, Salesforce is like the superhero of software.…
Maximize Revenue: Hire Salesforce Sales Cloud Developer Team
In the modern competitive landscape, a CRM is no longer just a database; it is the engine that drives your entire sales pipeline. To transform…
Popular Salesforce Videos
Salesforce Relationship Considerations
In this video learn about the Important considerations while working with different types of Relationships in Salesforce such as Lookup Relationship, Master-Detail Relationship, Many-to-Many Relationship,…
How to Reference Custom Metadata Types to Optimize Salesforce Account Records Using Salesforce Flow
Watch this video to learn how to reference custom metadata types to optimize Salesforce Account Records Using Salesforce Flow Salesforce Account Region Allocation using custom…
Introduction to Salesforce Apex for Developers
Have you ever wanted to write a Trigger in Salesforce? This workshop is designed for people who would like to begin learning the basics of…
Popular Salesforce Infographics
How to Select Best Salesforce Implementation Partner
Selecting a Salesforce Implementation Partner may be both challenging and straightforward at the same time, particularly if this is your first time searching for a…
6 Tips to Evaluate the Right Salesforce QA Vendor
Salesforce is the ultimate customer success platform, which makes it important to choose the right partner for your Salesforce project especially because it governs your…
What is a CRM System?
Customer relationship management (CRM) is a technology for managing all your company's relationships and interactions with customers and potential customers. The goal is simple: Improve…